/**
 * 
 */
package com.yeook.ymax.xml.factory;

import com.yeook.ymax.xml.WallpaperXmlBean;
import com.yeook.ymax.xml.YooekXmlBean;
import com.yeook.ymax.xml.YooekXmlHandler;

/**
 * 解析<id>1</id>
 * 
 * @author wangbo
 *
 */
public class IdHandler implements YooekXmlHandler {
	private YooekXmlBean xml;
	/* (non-Javadoc)
	 * @see com.yeook.android.xml.YooekXmlHandler#createELHandler(com.yeook.android.xml.YooekXmlBean)
	 */
	@Override
	public void createELHandler(YooekXmlBean obj) {
		this.xml = obj;
	}

	/* (non-Javadoc)
	 * @see com.yeook.android.xml.YooekXmlHandler#handler(java.lang.String)
	 */
	@Override
	public void handler(String data) {
		WallpaperXmlBean bean = this.xml.getWallpapers().get(xml.getWallpapers().size()-1);
		bean.setId(Integer.parseInt(data));
	}

	/* (non-Javadoc)
	 * @see com.yeook.android.xml.YooekXmlHandler#closeELHandler()
	 */
	@Override
	public void closeELHandler() {

	}

}
